<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<title>添加资源信息</title>
<link th:replace="common/header"/>
</head>
<body class="no-skin">
	<div th:replace="common/top"/>
	<div class="main-container ace-save-state" id="main-container">
		<div th:replace="common/menu"/>
		<div class="main-content">
			<div class="main-content-inner">
				<div th:replace="common/title"/>
				<div class="page-content">
					<div th:replace="common/skin"/>
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<form class="form-horizontal" action="" name="form" th:action="@{/sys/sysResources/add}" th:method="post" th:object="${sysResources}">
								<h3 class="header smaller lighter blue"><i class="fa fa-plus" aria-hidden="true"></i>添加资源信息</h3>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="name">资源名称:<font style="color:red">*</font></label>
											<div class="controls">
												<input type="text" name="name" id="name" class="input_fix" placeholder="资源名称" th:value="*{name}" maxlength="50"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('name')}" th:errors="*{name}" >Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="parentId">父资源编号:<font style="color:red">*</font></label>
											<div class="controls">
												<input type="text" name="parentId" id="parentId" class="input_fix" placeholder="父资源ID" th:value="*{parentId}" maxlength="50"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('parentId')}" th:errors="*{parentId}" >Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="resUrl">资源链接:<font style="color:red">*</font></label>
											<div class="controls">
												<input type="text" name="resUrl" id="resUrl" class="input_fix" placeholder="资源链接" th:value="*{resUrl}" maxlength="50"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('resUrl')}" th:errors="*{resUrl}" >Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="type">资源类型:<font style="color:red">*</font></label>
											<div class="controls">
												<select class="form-control" name="type" id="type" th:value="*{type}">
													<option value="">--请选择--</option>
													<option th:each="type : ${T(xyz.ibenben.zhongdian.system.entity.enums.ResourceTypeEnum).values()}" th:unless="${type.value eq 0}" th:value="${type}" th:text="${type.text}"></option>
												</select>
											</div>
										</div>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('type')}" th:errors="*{type}" >Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="sort">排序:<font style="color:red">*</font></label>
											<div class="controls">
												<input type="text" name="sort" id="sort" class="input_fix" placeholder="排序" th:value="*{sort}" maxlength="50"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('sort')}" th:errors="*{sort}" >Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
									<div class="text-center span12">
										<button shiro:hasPermission="/sys/sysResources/add" class="btn btn-primary" type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>提交</button>
										<button shiro:hasPermission="/sys/sysResources/add" class="btn btn-danger" type="reset"><i class="fa fa-times" aria-hidden="true"></i>取消</button>
										<a shiro:hasPermission="/sys/sysResources/getall" class="btn" href="" th:href="@{/sys/resources/getall}"><i class="fa fa-reply" aria-hidden="true"></i>返回</a>
									</div>
								</div>
							</form>
							<!-- PAGE CONTENT ENDS -->
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>
		</div><!-- /.main-content -->
		<div th:replace="common/footer"/>
	</div><!-- /.main-container -->
	<div th:replace="common/buttom"/>

	<script type="text/javascript">
		$("form").submit(function(){  
			$(":submit",this).attr("disabled","disabled");  
		}); 
	</script>
</body>
</html>
